import { director } from "cc";

export class IncidentEvent {
    public static Demo = "Demo"
    public static OverTask = "OverTask"
}

export class EventManager {
    public static Emit(event: string, ...arg: any) {
        director.getScene().emit(event, ...arg);
    }
    public static on(type: string, callback: Function, target?: any) {
        director.getScene().on(type, callback, target);
    }

    public static off(type: string, callback?: Function, target?: any) {
        director.getScene()?.off(type, callback, target);
    }
}